Repository navigation
Delete misplaced GitHub rows without a same-number pair - #869
Conversation
A foreign row at a number its repository hasn't reached yet has no pair, so the majority rule alone decides.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the GitHub row-cleanup changes.
No open issues 🎉
What changed in this PR
Extends the GitHub row cleanup introduced in #868 to remove misplaced rows even when no same-number pair exists, addressing another part of #852.
Changes:
- Removes the pairing requirement while retaining the 80% repository-majority rule.
- Skips repository lookups for legacy node IDs and clears the cache above 100,000 entries.
- Updates tests to cover unpaired-row deletion, legacy-row preservation, and skipped legacy lookups.
| File | Description |
|---|---|
| test/models/issue_test.rb | Tests unpaired-row deletion and legacy node ID handling. |
| app/models/issue.rb | Broadens cleanup eligibility and limits lookup and cache overhead. |
Review effort: Balanced
Follow-up to #868 for #852.
delete_misplaced_github_rowsonly considered rows that shared a number with another row in their repository, so foreign rows at numbers the repository hasn't reached yet stayed (opencollective-api still had #193655, #19872 and #13245 from other repositories). This drops the pairing condition and relies on the 80% majority rule alone.Without the pair filter every repository with new-format node ids gets a lookup, so rows with legacy ids now skip the lookup and the home id cache is cleared past 100k entries to keep memory bounded.
Summary by CodeRabbit